// PurchaseService.java - 服务接口
package com.example.electricbicycle.service;

import com.example.electricbicycle.po.PurchaseOrder;
import com.example.electricbicycle.po.Vehicle;
import java.util.List;

public interface PurchaseService {
    boolean createPurchaseOrder(PurchaseOrder order);
    boolean updatePurchaseOrder(PurchaseOrder order);
    boolean deletePurchaseOrder(int orderId);
    PurchaseOrder getPurchaseOrderById(int orderId);
    List<PurchaseOrder> getSalesmanPurchaseOrders(int salesmanId);
    boolean canEditOrder(int orderId);
    List<Vehicle> getAllVehicles();
    Vehicle getVehicleById(int id);
    int getTotalOrderCount(int salesmanId);
    int getPendingOrderCount(int salesmanId);
    int getApprovedOrderCount(int salesmanId);
    List<PurchaseOrder> getFilteredOrders(int salesmanId, String type);
    List<PurchaseOrder> getAllOrdersForSalesman(int salesmanId);
    boolean createVehicle(Vehicle vehicle);
    boolean updateVehicle(Vehicle vehicle);
    boolean deleteVehicle(int vehicleId);

}